<?php
declare (strict_types=1);

namespace app\admin\controller;

use addons\Builder\facade\Builder;

//该文件为自动生成，请按需修改
class Bank extends Base
{
    //主键，默认为id
    protected string $pk = 'id';

    //主模型
    protected string $model = '\app\common\model\Bank';

    public function index(): string
    {
        return Builder::Table()
            ->autoStructure($this->model, $this->pk, 'barDemo,200')
            ->addRightButtons(['edit' => ['size' => '60%'], 'delete'])
            ->addTopButtons(['add' => ['size' => '60%'], 'deleteAll'])
            ->addSearch([
                ['title', '标题搜索', 'input,Like'],
            ])->fetch();
    }

    public static function getStatus(): array
    {
        return [0 => '禁用', 1 => '开启'];
    }
}
